Add functionality to support keys outside of directional arrows and enter button.#11
Add functionality to support keys outside of directional arrows and enter button.#11sixfngers wants to merge 3 commits intodead:masterfrom
Conversation
…nd enter. ex: use case mapping a key to simulate the home button on a tv remote.
focusing on the search field and pressing the space bar mirrors the functionality of pressing the enter button focusing on the search field and pressing the escape key logs "esc was pressed" to the console
|
is this working? |
|
It works for me. because the feature code is not merged into dead/react-key-navigation repo npm install on the example writes the original repo files into node_modules. If you pull the code from my pull request build the react-key-navigation code and replace examples/youtube-react-tv/node_modules/react-key-navigation/build/ folder with react-key-navigation/build and run the example you will see the console log as stated above. Steps to get the custom key example running cd examples/youtube-react-tv/ open browser to view example, when the focus is on the search bar at the top, press space or esc and you will see the console log, (spacebar press does same action as enter, esc only has a console log) |
The main use case for this functionality is the ability to map a key like the escape button the functionality of a home or back button on a TV remote.